package com.wendu.oa.leave.common;

public enum LeaveStatusEnum {

    UNCOMMITED(0,"未提交"),
    TO_EXAM(1,"待审批"),
    UNPASSED(2,"已驳回"),
    PASSED(3,"待销假"),
    BACK(4,"已销假");


    private int code;
    private String name;

    private LeaveStatusEnum(int code,String name){
        this.code = code;
        this.name = name;
    }

    public int getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static String getName(int code){
        LeaveStatusEnum[] arr = LeaveStatusEnum.values();
        for(LeaveStatusEnum st : arr){
            if(st.code == code){
                return st.name;
            }
        }
        return null;
    }

}
